Fixed the 18751 and 18896 flaky tests#33737
Merged
PureWeen merged 5 commits intodotnet:mainfrom Feb 2, 2026
Merged
Conversation
Contributor
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request aims to reduce flakiness in Issue18751/Issue18896 UI tests by removing reliance on external network-hosted images and simplifying the tests now that data is local.
Changes:
- Switched monkey image sources from external URLs to local image files in HostApp test data.
- Simplified the Issue18751/Issue18896 UI tests by removing internet connectivity checks and related attributes.
- Updated Issue18896 UI (ListView) configuration to better support variable row heights.
Reviewed changes
Copilot reviewed 5 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18896.cs | Removes connectivity checks/skip attributes; keeps a fixed sleep before screenshot (flakiness concern). |
| src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18751.cs | Removes connectivity checks and async delay; simplifies test to screenshot after page load. |
| src/Controls/tests/TestCases.HostApp/Issues/Issue18896.xaml.cs | Drops isInternetRequired: true from the Issue attribute. |
| src/Controls/tests/TestCases.HostApp/Issues/Issue18896.xaml | Adds HasUnevenRows="True" and minor formatting updates. |
| src/Controls/tests/TestCases.HostApp/Issues/Issue18751.xaml.cs | Updates MonkeysViewModel image references to local files (but Issue attribute still says internet required). |
| src/Controls/tests/TestCases.HostApp/Resources/Images/papio.jpg | Adds local image asset used by test data. |
| src/Controls/tests/TestCases.HostApp/Resources/Images/capuchin.jpg | Adds local image asset used by test data. |
| src/Controls/tests/TestCases.HostApp/Resources/Images/saimiri.jpg | Adds local image asset used by test data. |
| src/Controls/tests/TestCases.HostApp/Resources/Images/golden.jpg | Adds local image asset used by test data. |
| src/Controls/tests/TestCases.HostApp/Resources/Images/alouatta.jpg | Adds local image asset used by test data. |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18896.cs
Outdated
Show resolved
Hide resolved
kubaflo
requested changes
Jan 28, 2026
Contributor
kubaflo
left a comment
There was a problem hiding this comment.
When you fix the copilot suggestions it will be ready to go
This was referenced Jan 28, 2026
Open
Member
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
792992a to
a284f8d
Compare
PureWeen
added a commit
that referenced
this pull request
Jan 29, 2026
PureWeen
added a commit
that referenced
this pull request
Jan 29, 2026
Contributor
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
kubaflo
previously approved these changes
Jan 29, 2026
Contributor
Member
|
/rebase |
872ab90 to
7b5c152
Compare
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
PureWeen
added a commit
that referenced
this pull request
Jan 31, 2026
…33749) > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ## Description This PR improves the reliability of several flaky UI tests by: 1. **Replacing `Thread.Sleep` with `retryTimeout`** - The `retryTimeout` parameter keeps retrying screenshot comparisons until they match or timeout, adapting to actual UI timing across different machines/load conditions. 2. **Fixing Issue10563 SwipeView button animations** - Added flat `Background = SolidColorBrush(Colors.LightGray)` to buttons to prevent ripple animation artifacts that caused visual differences on CI. ## Changes | Test | Issue | Fix | |------|-------|-----| | Issue10563 | Button ripple animation artifacts in SwipeView test | Flat button background + updated baselines | | Issue18857 | Thread.Sleep causes flakiness | `retryTimeout: TimeSpan.FromSeconds(2)` | | Issue24856 | Thread.Sleep causes flakiness | `retryTimeout: TimeSpan.FromSeconds(2)` | | Issue25192 | Thread.Sleep causes flakiness | `retryTimeout: TimeSpan.FromSeconds(2)` | | Issue27418 | Thread.Sleep causes flakiness | `retryTimeout: TimeSpan.FromSeconds(2)` | | Issue28657 | Thread.Sleep causes flakiness | `retryTimeout: TimeSpan.FromSeconds(2)` | | Issue30575 | Thread.Sleep causes flakiness | `retryTimeout: TimeSpan.FromSeconds(3)` | ## Related PRs (not overlapping) - #33737 - Fixes Issue18751/18896 (local monkey images) - #33689 - Fixes Issue12134 (WebView cookies) --------- Co-authored-by: Ahamed-Ali <102580874+Ahamed-Ali@users.noreply.github.com>
kubaflo
pushed a commit
to kubaflo/maui
that referenced
this pull request
Feb 2, 2026
…otnet#33749) > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ## Description This PR improves the reliability of several flaky UI tests by: 1. **Replacing `Thread.Sleep` with `retryTimeout`** - The `retryTimeout` parameter keeps retrying screenshot comparisons until they match or timeout, adapting to actual UI timing across different machines/load conditions. 2. **Fixing Issue10563 SwipeView button animations** - Added flat `Background = SolidColorBrush(Colors.LightGray)` to buttons to prevent ripple animation artifacts that caused visual differences on CI. ## Changes | Test | Issue | Fix | |------|-------|-----| | Issue10563 | Button ripple animation artifacts in SwipeView test | Flat button background + updated baselines | | Issue18857 | Thread.Sleep causes flakiness | `retryTimeout: TimeSpan.FromSeconds(2)` | | Issue24856 | Thread.Sleep causes flakiness | `retryTimeout: TimeSpan.FromSeconds(2)` | | Issue25192 | Thread.Sleep causes flakiness | `retryTimeout: TimeSpan.FromSeconds(2)` | | Issue27418 | Thread.Sleep causes flakiness | `retryTimeout: TimeSpan.FromSeconds(2)` | | Issue28657 | Thread.Sleep causes flakiness | `retryTimeout: TimeSpan.FromSeconds(2)` | | Issue30575 | Thread.Sleep causes flakiness | `retryTimeout: TimeSpan.FromSeconds(3)` | ## Related PRs (not overlapping) - dotnet#33737 - Fixes Issue18751/18896 (local monkey images) - dotnet#33689 - Fixes Issue12134 (WebView cookies) --------- Co-authored-by: Ahamed-Ali <102580874+Ahamed-Ali@users.noreply.github.com>
PureWeen
approved these changes
Feb 2, 2026
Member
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description of Change
This pull request updates test data and test code for two monkey-related UI test cases, focusing on removing dependencies on external internet resources and cleaning up test attributes and structure. The main changes include switching image sources from URLs to local files, removing internet connectivity checks, and simplifying test code and attributes.
Test Data Updates:
ImageUrlfields in theMonkeysViewModel(used by both issues) to reference local image files instead of external URLs, eliminating the need for internet access during tests.Test Code Cleanup and Simplification:
Issue18751TestandIssue18896Test, since images are now loaded locally. [1] [2]Issue18896Testby removing the retry delay parameter.UI Test Enhancement:
HasUnevenRowsin theListViewforIssue18896to better support variable item heights.Issues Fixed
Fixes #33507